package com.excilys.model;

import org.joda.time.DateTime;

/**
 * Class that helps to create the unique lign for the card transactions
 * 
 * @author excilys dev : GF
 * 
 */
@SuppressWarnings("serial")
public class TransactionCardCumul extends Transaction {

	private String cardLabel;

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public TransactionCardCumul() {
		this.transactionType = TransactionType.CARD;
	}

	public TransactionCardCumul(double transactionAmount, DateTime transactionDate, Account transactionAccount, String cardLabel) {
		super(transactionAmount, transactionDate, transactionAccount);
		this.cardLabel = cardLabel;
		this.transactionType = TransactionType.CARD;
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	@Override
	public String printDate() {
		return this.getTransactionDate().toString("MM/yy");
	}

	@Override
	public String printLabel() {
		return this.getLabel();
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public String getLabel() {
		return cardLabel;
	}

	public void setLabel(String cardLabel) {
		this.cardLabel = cardLabel;
	}

}
